package com.pg.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pg.entity.LiklUser;
import com.pg.mapper.LiklUserMapper;
import com.pg.service.ILiklUserService;
import org.jeecg.common.system.query.QueryGenerator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @Description: 用户表
 * @Author: jeecg-boot
 * @Date: 2020-08-12
 * @Version: V1.0
 */
@Service
@DS("proxyDs")
@Primary
public class LiklUserServiceImpl extends ServiceImpl<LiklUserMapper, LiklUser> implements ILiklUserService {

    @Autowired
    private LiklUserMapper liklUserMapper;

    @Override
    public IPage<LiklUser> selectForList(Page<LiklUser> page, LiklUser liklUser, Map<String, String[]> parameterMap) {
        System.out.println("11111111111111111111111111");
        System.out.println(parameterMap);
        System.out.println("11111111111111111111111111");
        QueryWrapper<LiklUser> queryWrapper = QueryGenerator.initQueryWrapper(liklUser, parameterMap);
        queryWrapper.eq("org","普元");
        return liklUserMapper.selectPage(page, queryWrapper);

    }
}
